package cn.zebra.dev.mall.module.cart.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;

/**
 * @author runnable@sina.cn
 */
@Getter
@Setter
@ToString
public class UpdateNumVO {

    @ApiModelProperty("购物车子列表id")
    @NotNull(message = "请选择商品!")
    private Long id;

    @ApiModelProperty("修改的数量")
    @NotNull(message = "请输入数量!")
    @DecimalMin(value = "1", message = "数量不能小于0!")
    @DecimalMax(value = "10000", message = "单次购买数量不能超过10000!")
    private Long num;
}
